﻿using System;
using System.Collections.Generic;
using System.Text;
using SampleFramework;
using SlimDX;
using SlimDX.Direct3D9;

namespace Nimue.Spatial
{
    class Octree
    {
        #region Fields
        private float width, height, depth;
        private OctreeNode rootNode;
        private int maximumNumberOfEntities;
        private int maximumNumberOfLevels;
        #endregion

        #region Public Properties
        public float Width
        {
            get { return width; }
        }
        public float Height
        {
            get { return height; }
        }
        public float Depth
        {
            get { return depth; }
        }
        public OctreeNode RootNode
        {
            get { return rootNode; }
        }
        #endregion

        #region Constructor
        public Octree(float width, float height, float depth, int maximumNumberOfEntities, int maximumNumberOfLevels)
        {
            this.width = width;
            this.height = height;
            this.depth = depth;
            this.maximumNumberOfEntities = maximumNumberOfEntities;
            this.maximumNumberOfLevels = maximumNumberOfLevels;

            rootNode = new OctreeNode(Vector3.Zero, width, height, depth, new LinkedList<object>());
        }
        #endregion
    }
}
